package com.practice.aaDatatype001.integertype;
/**
 * @author yangdejun
 * @date 2020/10/19
 **/
public class Resume {
    public static void main(String[] args) {

        int a = 127;
        int b = 128;
        int c = -128;
        int d = -129;

        Integer e = 127;
        Integer f = 127;
        Integer g = new Integer(127);

        Integer h = 128;
        Integer i = 128;
        Integer j = new Integer(128);

        Integer k = -128;
        Integer l = -128;
        Integer m = new Integer(-128);

        Integer n = -129;
        Integer o = -129;
        Integer p = new Integer(-129);

        System.out.println(a == e);            // true
        System.out.println(a == g);            // true
        System.out.println(e == f);            // true
        System.out.println(e == g);            // false
        System.out.println(e.equals(a));       // true
        System.out.println(g.equals(a));       // true
        System.out.println(e.equals(f));       // true
        System.out.println(e.equals(g));       // true

    }
}
